// Node - Sensor Sensor of EMS TOSSIM simulation
// by Mina Jung @ syracuse university
// April 2010


#import <space.h>				
#import <gui.h>
#import "SensorSpace.h"				 

typedef int SensedValue;

@interface Sensor: SwarmObject
{
  // Sensor Information
  int mid;   // sensor id
  int aid;   // application id..
  int sid;   // sensing data type

  char application[20];

  int vision;
  int age;
  int timerFreq;

  int sentMsgs;
  int recvMsgs;

  int sentMsgsNow;
  int recvMsgsNow;

  double amtBat;
  double initBat;
  double maxBat;
  double totalCurrent;
  double totCurCpu; 
  double totCurRadio; 
  double totCurLeds; 

  double secCurCpu; 
  double secCurRadio; 
  double secCurLeds; 

  SensedValue sensedValue[5];

  SensorState moteState;

  id modelSwarm;
  SensorSpace *sensorSpace;				  


  @public
  int x, y;				  // spatial coordinates
}

- step; // hmmmm,, just copied from heat bug

- drawSelfOn: (id <Raster>)r;

- setModelSwarm: s;

- setVision: (int)v;

- setTimerFreq: (int)val;

- updateSensedValue: (int)t;
- (SensedValue)getSensedValue: (int) t;


- (double)getAmtBattery;
- setAmtBattery: (double)amt_bat;

- (double)getInitBattery;
- setInitBattery: (double)amt_bat;

- (double)getMaxBattery;
- setMaxBattery: (double)amt_bat;

- (double)getTotalCurrent;
- setTotalCurrent: (double)total;

- (double)getTotCurrent;
- (double)getSecCurrent;
- setTotCurrentType: (int)type To: (double)value;

- (double)getTotCurrentC;
- (double)getTotCurrentR;
- (double)getTotCurrentL;

- (double)getSecCurrentC;
- (double)getSecCurrentR;
- (double)getSecCurrentL;

- setSentMsgs: (int)num;
- (int)getSentMsgs;
- (int)getSentMsgsNow;
- setRecvMsgs: (int)num;
- (int)getRecvMsgs;
- (int)getRecvMsgsNow;

- (SensorState)getSensorState;
- setSensorState: (SensorState)state;

- (int)getSensorId;
- (int)getAppId;
- (int)getX;
- (int)getY;
- setSensorId: (int)id;
- setAppId: (int)id;
- setDataType: (int)id;
- setApplication: (char *)name;

@end

